<!DOCTYPE >
<html lang="zh-cn">
<head>
  <title>统计</title>
  <% include ../partials/head %>
  <style type="text/css">
  .loveCotent li{vertical-align:top;display: inline-block;width: 24%;}
  .loveCotent li p{width: 100%;text-align: center;line-height: 100px;}
  .big{font-size: 50px;font-weight: bold;}
  </style>
    <link rel="stylesheet" type="text/css" href="/js/public/plugin/datepicker.css">
    <script src="/js/public/plugin/jquery-1.9.1.min.js"></script>
    <script src="/js/public/plugin/datepicker.js"></script>    
    <script type="text/javascript">
        oStatic={
            operation:function(){
                $(".datepicker").datepicker();
                $(".datepicker").on("change",function(){
                    var string = $(".datepicker")[0].value;
                    var year = string.split('/')[0];
                    var month = string.split('/')[1]-1;
                    var day = string.split('/')[2];
                    var date = new Date(year,month,day);
                    $.post("/admin/statisticCost",{
                        "date":date
                    },function(json){
                        console.log(json);
                        //$(".totalcount").html(json.data.totalcount);
                        //$(".totalmoney").html(json.data.totalmoney)
                        $(".todayPeopleLength").html(json.data.todayPeopleLength)
                        $(".todayNumber").html(json.data.todayNumber)
                        $(".todayTime").html(json.data.todayTime)
                        $(".todayMoney").html(json.data.todayMoney)
                    },'json')
                })                
            },
            init:function(){
                this.operation();
            }
        }
        $(document).ready(function(){
            oStatic.operation();
        })
    </script>

</head>
<body>
	<header>
      <% include ../partials/header %>
  </header>
  <div class="ch-container">
    <% include ../partials/sidebar %>
    <!-- 页面内容 -->
    <!-- 页面内容 -->
    <div id="content" class="col-lg-10 col-sm-10">
        <div class="row">
          <div class="box col-md-12">
            <label>请选择查看的日期：</label>
            <input type="text" class="datepicker" data-date-format="yyyy/mm/dd" data-auto-close="true">
          	<div class="box-inner">
                 <ul class="loveCotent">
                   <li>
                       <p>总消费人数：</p>
                       <p class="big peopleLength"><%=peopleLength%></p>
                   </li>
                    <li>
                       <p>总消费次数：</p>
                       <p class="big number"><%=number%></p>
                   </li>
                    <li>
                       <p>总消费钱数</p>
                       <p class="big money"><%=money%></p>
                   </li>
                    <li>
                       <p>总通话时长</p>
                       <p class="big time"><%=time%></p>
                   </li>
                   <li>
                    <p>当天消费人数</p>
                    <p class="big todayPeopleLength"><%=todayPeopleLength%></p>
                </li>
                <li>
                    <p>当天消费次数</p>
                    <p class="big todayNumber"><%=todayNumber%></p>
                </li>
                <li>
                    <p>当天消费钱数</p>
                    <p class="big todayMoney"><%=todayMoney%></p>
                </li>
                <li>
                    <p>当天通话时长</p>
                    <p class="big todayTime"><%=todayTime%></p>
                </li>
        </ul>
    </div>
</div>
</div>
</div> 
<% include ../partials/footer %>
</div>
<% include ../partials/external %>
</body>
</html>